package cn.tom.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

import java.util.Date;

@Data
public class Book {
    private Integer id;
    private String name;  //商品名称
    private String sn;    //商品序号
    private Double price; //销售价格
    private Double price2; //会员价格
    private String maker; //厂家出版社
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date tmake;  //出版日期
    private Integer typeid; //商品类型
    private String author; //产地或作者
    private Integer salenum ; //月销量
    private Integer stock;   //库存数
    private String info;//商品详情
    private String info2; //商品详情2
    private String pic; //封面
        public Book() {
        this.id = 0;
        this.name = "";
        this.sn = "";
        this.price = 0.0;
        this.price2 = 0.0;
        this.maker = "";
        this.typeid = 0;
        this.author = "";
        this.salenum = 0;
        this.stock = 0;
        this.info = "";
        this.info2 = "";
        this.pic = "";
    }

}
